package dipl.algorithm.math.fp.primitive;


/**
  * point in 2d real space
 */
public class Point2df {

    //
    // CONSTRUCTOR METHODS
    //

    public Point2df() {
      x = 0.0;
      y = 0.0;
    }

    public Point2df( double x, double y ) {
      this.x = x;
      this.y = y;
    }

    public Point2df( Point2df other ) {
      x = other.x;
      y = other.y;
    }

    //
    // PUBLIC METHODS
    //

    /**
     * 
     * @param other
     */
    public void Set( Point2df other ) {
      x = other.x;
      y = other.y;
    }

    /**
     *
     * @param x
     * @param y
     */
    public void Set( double x, double y ) {
      this.x = x;
      this.y = y;
    }

    @Override
    public String toString() {
      return "x:"+Double.toString( x )+", y:"+Double.toString( y );
    }


    //
    // MEMBERS
    //

    public double x;
    public double y;
  }
